#include "putongui.h"
#include "ui_putongui.h"

puTongUI::puTongUI(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::puTongUI)
{
    ui->setupUi(this);
    //
    this->tcp = NULL;
    this->message = NULL;
    //将个人信息

}
//函数接受到我的消息包和消息流
void puTongUI::puTong_NeedMessage(messageText*msg,QTcpSocket*sock){
    this->message = msg;
    this->tcp = sock;
}
puTongUI::~puTongUI()
{
    delete ui;
}

void puTongUI::on_shuaxinGeRenXinXi_clicked()
{
    //刷新个人信息
    ui->putonYongHuName->setText(this->message->name);
    ui->putongYongHuAge->setText(QString::number(this->message->age));
    ui->putongYongHuID->setText(QString::number(this->message->id));
    ui->putongYongHuSolary->setText(QString::number(this->message->solary));
    QString p = "NO SUPER USER";
    ui->puTongYongHuMod->setText(p);
}
//返回登入页面 按钮
void puTongUI::on_fanHuiDengRuJieMian_clicked()
{
    //发送返回主界面的信号
    emit puTong_zhujiemianShow();
}
